import http from "@/http/index";

export function Login(data){
    return http.post('user/login',data);
}


//日志操作
export function GetLog(page){
    let params={page:page,size:5}
    return http.get('log/select/all',{params:params});
}
export function SearchLog(params){
    return http.get("/log/select/ip",{params:params});
}
export function AddLog(data){
    let PostData = {logList:data}
    // PostData.logList.push(data)
    return http.post("/log/insert",PostData);
}
export function EditLog(data){
    let PostData = {logList:data}
    // PostData.logList.push(data)
    return http.post("/log/update",PostData);
}
export function DeleteLog(id){
    let data={idList:[id]};
    return http.post("/log/delete",data)
}
export function SearchLogByTime(params){
    return http.get("/log/select/time",{params:params})
}